Skip to content

Conversation

@Kshitij09
Copy link
Contributor

In Podcast Player example of DifferentialProgramming.md, struct Observation has variable named podcastState, while it has been referenced as state in the meanError function.

Changed it to podcastState.

Relevant code snippet:

struct Observation {
    var podcastState: PodcastState
    var userSpeed: Float
}

func meanError(for model: PodcastSpeedModel, _ observations: [Observation]) -> Float {
    var error: Float = 0
    for observation in observations {
        error += abs(model.prediction(for: observation.state) - observation.userSpeed)
    }
    return error / Float(observations.count)
}

In Podcast Player example of Intelligent Systems, struct `Observation` has var `podcastState`, while it has been referenced as `state` in the following cell. Changed it to `podcastState`.
@theblixguy theblixguy requested a review from dan-zheng May 3, 2020 18:36
Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dan-zheng
Copy link
Contributor

@swift-ci Please smoke test and merge

@dan-zheng
Copy link
Contributor

@swift-ci Please smoke test Linux

@dan-zheng dan-zheng merged commit fae995a into swiftlang:master May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants